<template>
    <div class="navbar">
        <div class="left">
            <slot name="left"></slot>
        </div>
        <div class="center">
            <slot name="center"></slot>
        </div>
        <div class="right">
            <slot name="right"></slot>
        </div>

        <div>
            <!-- 动态插槽名 -->
            <slot :name="name"></slot>  
        </div>
    </div>
</template>
<script>
export default {
    props: ["name"],
    name: '',
    data() {
       return {}
    },
    created() {},
    methods: {},
}
</script>
<style scoped>
.navbar {
    display: flex;
}
.left, .right {
    width: 80px;
    background: plum;
}
.center {
    flex: 1;
    background: purple;
}
</style>
